ci: fix preview workflow — single comment with changed page links#12
Merged
Conversation
- Rewrite preview-docs.yml to use a matrix generate job + a single comment job - Each matrix job uploads its preview URL as an artifact - The comment job collects all URLs and posts one consolidated table - Uses comment_tag + upsert mode to auto-update on each push - Add graphql example to all workflow matrices (check, preview, publish) Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
🌿 No docs changes detected in this PR. |
- Single job instead of matrix + consolidation - Only generate previews for projects with actual file changes - Use PR number in preview IDs to avoid URL truncation collisions - Resolve changed MDX files to page slugs via get-slug-for-file API - Show per-project preview URL with changed page links - Upgrade to thollander/actions-comment-pull-request@v3 Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
This reverts commit edea970.
devalog
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites the preview workflow to match the pattern used by fern-api/docs:
/api/fern-docs/get-slug-for-fileAPI and lists themcomment-tag+upsertto update the same comment on each pushpr{number}-{project}format to avoid URL collisions from domain label truncation (the old{branch}-{project}IDs exceeded 63 chars for long branch names, causing identical URLs)graphqlto all workflow matrices (check, preview, publish)Comment format per changed project:
If no docs projects have changes (e.g. only workflow files), the comment says "No docs changes detected."
Review & Testing Checklist for Human
docs-starter) and verify the comment shows the preview URL + changed page linksgraphqlexample generates a valid preview with a unique URLNotes
thollander/actions-comment-pull-requestfrom v2 to v3 to match fern-api/docsLink to Devin session: https://app.devin.ai/sessions/4482e9f954d04c2cae29bfb4731b896d
Requested by: @devalog